Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Constants and Data Types


Buffer Types Enumeration

Each of the structures described by the structure types enumeration contains fields that point to different kinds of buffers. When you allocate memory for such a structure using the OTAlloc function (page 3-92), you can also specify that these buffers be allocated by specifying one or more of the constant names given by the buffer types enumeration.

The length of the allocated buffer is at least as large as the size returned for the endpoint by the OTGetEndpointInfo function (page 3-82). For each buffer allocated, the OTAlloc function sets the maxlen field to the length of the buffer, and the len field to 0. To specify more than one constant name, use the bitOR operator to combine values.

enum {
      T_ADDR      = 0x01,
      T_OPT       = 0x02,
      T_UDATA     = 0x04,
      T_ALL       = 0xffff
};
Constant descriptions

T_ADDR
The addr field of the TBind, TCall, TUDErr, TUnitRequest, or TUnitData structures.
T_OPT
The opt field of the TOptMgmt, TCall, TUDErr, TRequest, TReply, TUnitRequest, TUnitReply, or TUnitData structures.
T_UDATA
The udata field of the TCall, TDiscon, TUnitData, TRequest, TReply, TUnitRequest, or TUnitReply structures. The value of the udata.maxlen field depends upon the structure being allocated.
T_ALL
All relevant fields of the desired structure are allocated.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996